#ifndef CMODEL_H_
#define CMODEL_H_

#include <vector>
#include "cmaterial.h"
#include "cmesh.h"
#include "../io/cbinary.h"
#include "../math/cmatrix.h"

/**
 * CModel - class representing the 3D model
 * @author Michal Rost
 * @date 20.07.2007
 */
class CModel : public CObject {
public:
  CModel();
  CModel(const CModel &m);
  virtual ~CModel();
  CMesh* addNewMesh();
  CMaterial* addNewMaterial();
  int getNumOfMeshes() const;
  int getNumOfMaterials() const;
  CMesh* getMeshPtr(int index) const;
  CMaterial* getMaterialPtr(int index) const;
  static string getClassName() {
    return "CModel";
  }
protected:
  vector<CMesh*> meshes;
  vector<CMaterial*> materials;
  //vector<CBBox*> bboxes;
  void copyFrom(const CModel &m);
  void free();
};

#endif
